<template>
	<div class="aboutUs">
		<!-- 关于我们 -->
		<rich-text :nodes="aboutUs"></rich-text>
		<view class="bottom">
			<view class="top flex">
				<image :src="appData.website.logo"></image>
				<text class="name C_333">
					{{appData.website.name}}
				</text>
			</view>

			<view class="company C_999 mt_20">
				{{appData.website.company}}
			</view>
			<view class="copyright C_999">
				{{appData.website.copyright}}
			</view>
		</view>
	</div>
</template>

<script>
	import {
		policyIndex
	} from "@/common/api/index";
	// #ifdef APP
	import globalFunc from "@/mixins/globalFunc.js"
	// #endif

	export default {
		name: "aboutUs",
		components: {},
		// #ifdef APP
		mixins: [globalFunc],
		// #endif
		data() {
			return {
				aboutUs: "",
			};
		},
		onLoad(options) {
			this.getAboutUs(options.name);
			this.getUserInfo()
		},
		computed: {
			appData() {
				console.log(this.$store.state.appData);
				return this.$store.state.appData
			}
		},
		methods: {
			async getAboutUs(value) {
				const res = await policyIndex({
					type: value
				});
				if (res.code === 1) {
					this.aboutUs = res.data.content;
				} else {
					this.showMsg(res.msg);
				}
			},
		},
	};
</script>

<style scoped lang="scss">
	.aboutUs {
		padding: 40rpx;

		.bottom {
			text-align: center;
			margin-top: 50rpx;

			.top {
				justify-content: center;
				align-items: center;

				image {
					width: 70rpx;
					height: 70rpx;
					margin-right: 10rpx;
				}
			}

			.mt_20 {
				margin-top: 20rpx;
			}

			.C_999 {
				color: #999;
			}

			.C_333 {
				color: #333;
			}
		}
	}
</style>